﻿using System;
using WEATHER.Components;
using System.Web;

namespace WEATHER.Modules.ONLINE.Pages
{
    public partial class ProvinceWeatherDetail : System.Web.UI.Page
    {
        protected int MaxOfID;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {                
                Guid mid = new Guid(Request.QueryString["mid"]);
                ddlProvinces.SelectedValue = HttpUtility.UrlDecode(Request.QueryString["ProvinceCode"]);
                ContentPane.InnerHtml = HttpUtility.HtmlDecode(Province.GetWeatherDetailOnline(mid, HttpUtility.UrlDecode(Request.QueryString["ProvinceCode"])));
                //ContentPane.InnerHtml = HttpUtility.HtmlDecode(Province.GetWeatherDetailOffline(mid, HttpUtility.UrlDecode(Request.QueryString["ProvinceCode"])));
            }
        }

        protected void butView_Click(object sender, EventArgs e)
        {
            Guid mid = new Guid(Request.QueryString["mid"]);
            ContentPane.InnerHtml = HttpUtility.HtmlDecode(Province.GetWeatherDetailOnline(mid, ddlProvinces.SelectedValue));
            //ContentPane.InnerHtml = HttpUtility.HtmlDecode(Province.GetWeatherDetailOffline(mid, ddlProvinces.SelectedValue));
        }
    }
}
